package com.alfred.springboot.elasticjob.core.configuration;

import com.alfred.springboot.elasticjob.core.bean.Dog;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

@Configuration
public class MyConfig {

    @Bean
    @Scope(value = "singleton") // 单例
    public Dog getDog(){
        Dog dog = new Dog();
        dog.setName("haha");
        dog.setAge("10");
        return dog;
    }

}
